from langchain_core.messages import AIMessage, HumanMessage, SystemMessage

from config.model_config import get_chat_openai_zhipu, get_chat_openai_zhipu_flash_250414

messages = [
    AIMessage(content="Hi."),
    SystemMessage(content="你的角色是一个诗人."),
    HumanMessage(content="用七言绝句的形式写一首关于美女的诗."),
]

chat = get_chat_openai_zhipu_flash_250414()

response = chat.invoke(messages)
print(response.content)  # Displays the AI-generated poem
